{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 12 读取数据和简单的数据探索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib as mpl\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn import datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "iris = datasets.load_iris()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['data', 'target', 'target_names', 'DESCR', 'feature_names'])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Iris Plants Database\n",
      "====================\n",
      "\n",
      "Notes\n",
      "-----\n",
      "Data Set Characteristics:\n",
      "    :Number of Instances: 150 (50 in each of three classes)\n",
      "    :Number of Attributes: 4 numeric, predictive attributes and the class\n",
      "    :Attribute Information:\n",
      "        - sepal length in cm\n",
      "        - sepal width in cm\n",
      "        - petal length in cm\n",
      "        - petal width in cm\n",
      "        - class:\n",
      "                - Iris-Setosa\n",
      "                - Iris-Versicolour\n",
      "                - Iris-Virginica\n",
      "    :Summary Statistics:\n",
      "\n",
      "    ============== ==== ==== ======= ===== ====================\n",
      "                    Min  Max   Mean    SD   Class Correlation\n",
      "    ============== ==== ==== ======= ===== ====================\n",
      "    sepal length:   4.3  7.9   5.84   0.83    0.7826\n",
      "    sepal width:    2.0  4.4   3.05   0.43   -0.4194\n",
      "    petal length:   1.0  6.9   3.76   1.76    0.9490  (high!)\n",
      "    petal width:    0.1  2.5   1.20  0.76     0.9565  (high!)\n",
      "    ============== ==== ==== ======= ===== ====================\n",
      "\n",
      "    :Missing Attribute Values: None\n",
      "    :Class Distribution: 33.3% for each of 3 classes.\n",
      "    :Creator: R.A. Fisher\n",
      "    :Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)\n",
      "    :Date: July, 1988\n",
      "\n",
      "This is a copy of UCI ML iris datasets.\n",
      "http://archive.ics.uci.edu/ml/datasets/Iris\n",
      "\n",
      "The famous Iris database, first used by Sir R.A Fisher\n",
      "\n",
      "This is perhaps the best known database to be found in the\n",
      "pattern recognition literature.  Fisher's paper is a classic in the field and\n",
      "is referenced frequently to this day.  (See Duda & Hart, for example.)  The\n",
      "data set contains 3 classes of 50 instances each, where each class refers to a\n",
      "type of iris plant.  One class is linearly separable from the other 2; the\n",
      "latter are NOT linearly separable from each other.\n",
      "\n",
      "References\n",
      "----------\n",
      "   - Fisher,R.A. \"The use of multiple measurements in taxonomic problems\"\n",
      "     Annual Eugenics, 7, Part II, 179-188 (1936); also in \"Contributions to\n",
      "     Mathematical Statistics\" (John Wiley, NY, 1950).\n",
      "   - Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis.\n",
      "     (Q327.D83) John Wiley & Sons.  ISBN 0-471-22361-1.  See page 218.\n",
      "   - Dasarathy, B.V. (1980) \"Nosing Around the Neighborhood: A New System\n",
      "     Structure and Classification Rule for Recognition in Partially Exposed\n",
      "     Environments\".  IEEE Transactions on Pattern Analysis and Machine\n",
      "     Intelligence, Vol. PAMI-2, No. 1, 67-71.\n",
      "   - Gates, G.W. (1972) \"The Reduced Nearest Neighbor Rule\".  IEEE Transactions\n",
      "     on Information Theory, May 1972, 431-433.\n",
      "   - See also: 1988 MLC Proceedings, 54-64.  Cheeseman et al\"s AUTOCLASS II\n",
      "     conceptual clustering system finds 3 classes in the data.\n",
      "   - Many, many more ...\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(iris.DESCR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[5.1, 3.5, 1.4, 0.2],\n",
       "       [4.9, 3. , 1.4, 0.2],\n",
       "       [4.7, 3.2, 1.3, 0.2],\n",
       "       [4.6, 3.1, 1.5, 0.2],\n",
       "       [5. , 3.6, 1.4, 0.2],\n",
       "       [5.4, 3.9, 1.7, 0.4],\n",
       "       [4.6, 3.4, 1.4, 0.3],\n",
       "       [5. , 3.4, 1.5, 0.2],\n",
       "       [4.4, 2.9, 1.4, 0.2],\n",
       "       [4.9, 3.1, 1.5, 0.1],\n",
       "       [5.4, 3.7, 1.5, 0.2],\n",
       "       [4.8, 3.4, 1.6, 0.2],\n",
       "       [4.8, 3. , 1.4, 0.1],\n",
       "       [4.3, 3. , 1.1, 0.1],\n",
       "       [5.8, 4. , 1.2, 0.2],\n",
       "       [5.7, 4.4, 1.5, 0.4],\n",
       "       [5.4, 3.9, 1.3, 0.4],\n",
       "       [5.1, 3.5, 1.4, 0.3],\n",
       "       [5.7, 3.8, 1.7, 0.3],\n",
       "       [5.1, 3.8, 1.5, 0.3],\n",
       "       [5.4, 3.4, 1.7, 0.2],\n",
       "       [5.1, 3.7, 1.5, 0.4],\n",
       "       [4.6, 3.6, 1. , 0.2],\n",
       "       [5.1, 3.3, 1.7, 0.5],\n",
       "       [4.8, 3.4, 1.9, 0.2],\n",
       "       [5. , 3. , 1.6, 0.2],\n",
       "       [5. , 3.4, 1.6, 0.4],\n",
       "       [5.2, 3.5, 1.5, 0.2],\n",
       "       [5.2, 3.4, 1.4, 0.2],\n",
       "       [4.7, 3.2, 1.6, 0.2],\n",
       "       [4.8, 3.1, 1.6, 0.2],\n",
       "       [5.4, 3.4, 1.5, 0.4],\n",
       "       [5.2, 4.1, 1.5, 0.1],\n",
       "       [5.5, 4.2, 1.4, 0.2],\n",
       "       [4.9, 3.1, 1.5, 0.1],\n",
       "       [5. , 3.2, 1.2, 0.2],\n",
       "       [5.5, 3.5, 1.3, 0.2],\n",
       "       [4.9, 3.1, 1.5, 0.1],\n",
       "       [4.4, 3. , 1.3, 0.2],\n",
       "       [5.1, 3.4, 1.5, 0.2],\n",
       "       [5. , 3.5, 1.3, 0.3],\n",
       "       [4.5, 2.3, 1.3, 0.3],\n",
       "       [4.4, 3.2, 1.3, 0.2],\n",
       "       [5. , 3.5, 1.6, 0.6],\n",
       "       [5.1, 3.8, 1.9, 0.4],\n",
       "       [4.8, 3. , 1.4, 0.3],\n",
       "       [5.1, 3.8, 1.6, 0.2],\n",
       "       [4.6, 3.2, 1.4, 0.2],\n",
       "       [5.3, 3.7, 1.5, 0.2],\n",
       "       [5. , 3.3, 1.4, 0.2],\n",
       "       [7. , 3.2, 4.7, 1.4],\n",
       "       [6.4, 3.2, 4.5, 1.5],\n",
       "       [6.9, 3.1, 4.9, 1.5],\n",
       "       [5.5, 2.3, 4. , 1.3],\n",
       "       [6.5, 2.8, 4.6, 1.5],\n",
       "       [5.7, 2.8, 4.5, 1.3],\n",
       "       [6.3, 3.3, 4.7, 1.6],\n",
       "       [4.9, 2.4, 3.3, 1. ],\n",
       "       [6.6, 2.9, 4.6, 1.3],\n",
       "       [5.2, 2.7, 3.9, 1.4],\n",
       "       [5. , 2. , 3.5, 1. ],\n",
       "       [5.9, 3. , 4.2, 1.5],\n",
       "       [6. , 2.2, 4. , 1. ],\n",
       "       [6.1, 2.9, 4.7, 1.4],\n",
       "       [5.6, 2.9, 3.6, 1.3],\n",
       "       [6.7, 3.1, 4.4, 1.4],\n",
       "       [5.6, 3. , 4.5, 1.5],\n",
       "       [5.8, 2.7, 4.1, 1. ],\n",
       "       [6.2, 2.2, 4.5, 1.5],\n",
       "       [5.6, 2.5, 3.9, 1.1],\n",
       "       [5.9, 3.2, 4.8, 1.8],\n",
       "       [6.1, 2.8, 4. , 1.3],\n",
       "       [6.3, 2.5, 4.9, 1.5],\n",
       "       [6.1, 2.8, 4.7, 1.2],\n",
       "       [6.4, 2.9, 4.3, 1.3],\n",
       "       [6.6, 3. , 4.4, 1.4],\n",
       "       [6.8, 2.8, 4.8, 1.4],\n",
       "       [6.7, 3. , 5. , 1.7],\n",
       "       [6. , 2.9, 4.5, 1.5],\n",
       "       [5.7, 2.6, 3.5, 1. ],\n",
       "       [5.5, 2.4, 3.8, 1.1],\n",
       "       [5.5, 2.4, 3.7, 1. ],\n",
       "       [5.8, 2.7, 3.9, 1.2],\n",
       "       [6. , 2.7, 5.1, 1.6],\n",
       "       [5.4, 3. , 4.5, 1.5],\n",
       "       [6. , 3.4, 4.5, 1.6],\n",
       "       [6.7, 3.1, 4.7, 1.5],\n",
       "       [6.3, 2.3, 4.4, 1.3],\n",
       "       [5.6, 3. , 4.1, 1.3],\n",
       "       [5.5, 2.5, 4. , 1.3],\n",
       "       [5.5, 2.6, 4.4, 1.2],\n",
       "       [6.1, 3. , 4.6, 1.4],\n",
       "       [5.8, 2.6, 4. , 1.2],\n",
       "       [5. , 2.3, 3.3, 1. ],\n",
       "       [5.6, 2.7, 4.2, 1.3],\n",
       "       [5.7, 3. , 4.2, 1.2],\n",
       "       [5.7, 2.9, 4.2, 1.3],\n",
       "       [6.2, 2.9, 4.3, 1.3],\n",
       "       [5.1, 2.5, 3. , 1.1],\n",
       "       [5.7, 2.8, 4.1, 1.3],\n",
       "       [6.3, 3.3, 6. , 2.5],\n",
       "       [5.8, 2.7, 5.1, 1.9],\n",
       "       [7.1, 3. , 5.9, 2.1],\n",
       "       [6.3, 2.9, 5.6, 1.8],\n",
       "       [6.5, 3. , 5.8, 2.2],\n",
       "       [7.6, 3. , 6.6, 2.1],\n",
       "       [4.9, 2.5, 4.5, 1.7],\n",
       "       [7.3, 2.9, 6.3, 1.8],\n",
       "       [6.7, 2.5, 5.8, 1.8],\n",
       "       [7.2, 3.6, 6.1, 2.5],\n",
       "       [6.5, 3.2, 5.1, 2. ],\n",
       "       [6.4, 2.7, 5.3, 1.9],\n",
       "       [6.8, 3. , 5.5, 2.1],\n",
       "       [5.7, 2.5, 5. , 2. ],\n",
       "       [5.8, 2.8, 5.1, 2.4],\n",
       "       [6.4, 3.2, 5.3, 2.3],\n",
       "       [6.5, 3. , 5.5, 1.8],\n",
       "       [7.7, 3.8, 6.7, 2.2],\n",
       "       [7.7, 2.6, 6.9, 2.3],\n",
       "       [6. , 2.2, 5. , 1.5],\n",
       "       [6.9, 3.2, 5.7, 2.3],\n",
       "       [5.6, 2.8, 4.9, 2. ],\n",
       "       [7.7, 2.8, 6.7, 2. ],\n",
       "       [6.3, 2.7, 4.9, 1.8],\n",
       "       [6.7, 3.3, 5.7, 2.1],\n",
       "       [7.2, 3.2, 6. , 1.8],\n",
       "       [6.2, 2.8, 4.8, 1.8],\n",
       "       [6.1, 3. , 4.9, 1.8],\n",
       "       [6.4, 2.8, 5.6, 2.1],\n",
       "       [7.2, 3. , 5.8, 1.6],\n",
       "       [7.4, 2.8, 6.1, 1.9],\n",
       "       [7.9, 3.8, 6.4, 2. ],\n",
       "       [6.4, 2.8, 5.6, 2.2],\n",
       "       [6.3, 2.8, 5.1, 1.5],\n",
       "       [6.1, 2.6, 5.6, 1.4],\n",
       "       [7.7, 3. , 6.1, 2.3],\n",
       "       [6.3, 3.4, 5.6, 2.4],\n",
       "       [6.4, 3.1, 5.5, 1.8],\n",
       "       [6. , 3. , 4.8, 1.8],\n",
       "       [6.9, 3.1, 5.4, 2.1],\n",
       "       [6.7, 3.1, 5.6, 2.4],\n",
       "       [6.9, 3.1, 5.1, 2.3],\n",
       "       [5.8, 2.7, 5.1, 1.9],\n",
       "       [6.8, 3.2, 5.9, 2.3],\n",
       "       [6.7, 3.3, 5.7, 2.5],\n",
       "       [6.7, 3. , 5.2, 2.3],\n",
       "       [6.3, 2.5, 5. , 1.9],\n",
       "       [6.5, 3. , 5.2, 2. ],\n",
       "       [6.2, 3.4, 5.4, 2.3],\n",
       "       [5.9, 3. , 5.1, 1.8]])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150, 4)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['sepal length (cm)',\n",
       " 'sepal width (cm)',\n",
       " 'petal length (cm)',\n",
       " 'petal width (cm)']"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.feature_names   #4列分别表示的东西"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.target    #这是个一维向量， 代表150行中， 每一行对应的莺尾花的类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150,)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.target.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['setosa', 'versicolor', 'virginica'], dtype='<U10')"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "iris.target_names   #0,1，2 分别代表的类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = iris.data[:,:2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGWJJREFUeJzt3X+MXWWdx/H3d6cVK/7oYscVp8XusoQ/tKyFCdBtYgjo+ouULrKhBNSala66rrgazWKIJo0JMWyI65pIWogBqRW34mw1sIphiSuhTaYUqVqNoJV2wO3YbsFql6Xlu3/cO+309M6cc+c895znPOfzShrmnnvm3u955vCdO+d8znPM3RERkbT8Ud0FiIhIeGruIiIJUnMXEUmQmruISILU3EVEEqTmLiKSIDV3EZEEqbmLiCRIzV1EJEHziq5oZkPAODDh7pdnnlsL3AJMdBd9yd1vn+31Fi1a5EuXLu2rWBGRttuxY8dv3X04b73CzR24AdgNvHKG5+9x948UfbGlS5cyPj7ex9uLiIiZ/brIeoUOy5jZYuBdwKyfxkV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P28TSzP6bzyfxPgdcBp5vZddnVenxr4fFMurnTuf/rKjPbA3wduNTM7p6+grsfcPfnuw83AhdUW+JJtTzd/e9+4FvAhZlV9gHT/7JYzKl/yg1cXp3u/py7H+5+fR8w38wWVVzmPmCfu2/vPt5Cp4lm16l7PHPrjGQ8p7wDeNTd/7vHczGM55QZ64xkPN8C/MrdJ939BeBe4C8z6xwfz+6hm1cBB4u+QdLN3d1vdPfF7r6Uzp9oD7r7Sb8dM8cEVwG7Kyxxeh2nm9krpr4G/gr4cWa1rcB7u6mEi+n8KfdMbHWa2Wunjg2a2YV09rMDVdbp7r8B9prZud1FlwE/zaxW+3gWqTOG8ZzmGmY+1FH7eE4zY52RjOdTwMVm9rJuLZdxau/ZCryv+/VVdPpX4U/u84KU2TBmth4Yd/etwEfNbBVwlM5vxbU1lfUnwLe6+9w84Gvu/h9m9kEAd78NuI9OIuEJ4A/A+yOt8yrgQ2Z2FDgCrOlnpwzoH4BN3T/Rfwm8P8LxLFJnFONpZi8D3gr83bRl0Y1ngTprH093325mW+gcIjoK7AQ2ZHrTHcBXzewJOr1pTT/voStURUQSlPRhGRGRtlJzFxFJkJq7iEiC1NxFRBKk5i4ikiA1dxGRBKm5i4gkSM1dRCRB/w9iGQXFobFAYwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xae9c630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#x和y的值都是特征值\n",
    "plt.scatter(X[:,0], X[:,1])  #点和点之间没有顺序关系，  所以使用折线图连接起来是没有意义的\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "y = iris.target   # 类别"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAA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8Cbu9lOpZO7mV0DvOTuR7dZ7CFg3N0vBw6z+X/LQXiPu78b+ADwSTP7pZb57f7PXXS5U16Mj5H9U/idwH8C/rTg+CDbK3o3sODu7wJ+CPxWyzIpjGVInCmMJwBm9hPAfuC/tJvdZtpASvFy4hz4eJrZT5Htmf808A+BC8zsY62LtXlrV+NZ6eROdnPv/WZ2HPgS8D4zW9y6gLu/7O6vNV9+Abiy2BDPiuV7zb8vAX8CXNWyyPPA1n9Z7OPcf871VV6M7v6qu59sPv8qcJ6ZXVRkjGTj9Ly7P9p8/QBZEm1dZqBjSUCciYznhg8Aj7n7/2kzL4Xx3NAxzkTGcwr4rruvuvvrwFeAX2xZ5sx4Ng/d7AF+0M1GKp3c3f0z7r7P3cfJ/pn2NXc/6/+QLccF9wPHCgxxaxwXmNlPbjwH/jnw7ZbFHgR+pVmZcDXZP+deTClGM3vLxrFBM7uK7Df2clExArj794HnzOznmpMmgadbFhvoWIbGmcJ4bvGv6HyoY+DjuUXHOBMZz2eBq81spBnLJOfmnQeBX20+/yhZ7upqz73ec5glZGYHgWV3fxD4DTPbD6yR/Z/xugGF9Q+AP2n+7urAH7r7fzOzTwC4++eBr5JVJTwDnAI+nmCMHwVmzWwN+BFwbbc/ykj+HbDU/Cf63wIfT2wsQ+NMYjzNbAT4Z8C/3TItufEMiHPg4+nuj5rZA2SHiNaAbwKNlrz0ReAPzOwZsrx0bbfb0RWqIiIVVOnDMiIiw0rJXUSkgpTcRUQqSMldRKSClNxFRCpIyV1EpIKU3EVEKkjJXUSkgv4/ugI0noJ/O+4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xaea81d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 获得\n",
    "plt.scatter(X[y==0,0], X[y==0,1], color=\"red\")   \n",
    "plt.scatter(X[y==1,0], X[y==1,1], color=\"blue\")\n",
    "plt.scatter(X[y==2,0], X[y==2,1], color=\"green\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3X+QHOWZH/DvM7MYeXVmN2VtIkc/dhMpdUnOBQu7BThUtHNIie0zJf9xpIJLvhiKQwny5dYrrhx8lIWilOtiXwqhsw+olVwBn/YOLpzPwVd2wICEk6qcUrsyxubkSomzhMAoLOBdMDrp2Jknf/S0tqc1s/329Dvdb3d/P1VTu9Pd2/30q9Gzve8887SoKoiIqFgqWQdARET2MbkTERUQkzsRUQExuRMRFRCTOxFRATG5ExEVEJM7EVEBMbkTERUQkzsRUQH1mW4oIlUAswBeVdWbQutuBfD7AF5tLvqaqh5aaX9r1qzRkZGRWMESEZXd3NzcG6o6FLWdcXIHMAngBIArOqx/TFV/y3RnIyMjmJ2djXF4IiISkdMm2xlNy4jIegCfALDi1TgREbnBdM79fgCfB9BYYZtfF5EXRORxEdnQbgMR2SkisyIyOz8/HzdWIiIyFJncReQmAK+r6twKm30bwIiqXgngaQCPtNtIVadVdVxVx4eGIqeMiIioSyZX7jcA2C4ipwA8CuBGETkc3EBV31TVC82nBwGMWY2SiIhiiUzuqvoFVV2vqiMAbgHwrKp+OriNiHwo8HQ7vDdeiYgoI3GqZVqIyD4As6r6BIDfFpHtAJYAvAXgVjvhERFRN2J9iElVj/o17qq6p5nY/av7X1HVq1T1V1X1J70IlgpqZgYYGQEqFe/rzEzWERHlXtdX7kRWzMwAO3cC5855z0+f9p4DwI4d2cVFlHNsP0DZuuee5cTuO3fOW05EXWNyp2y9/HK85URkhMmdsrVxY7zlRGSEyZ2y9aUvAf39rcv6+73lRNQ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RUwAeBXCjiBwObqCqb6rqhebTgwDG0g2xJZafNb++DuDPAVwb2uQVAMG/LNbj0j/neioqRlV9W1V/0fz+OwAuE5E1acYIb5xeUdVjzeePw0ui4W0yHUsYxOnIePo+DuC4qv6/NutcGE9fxzgdGc9tAH6qqvOq+h6AbwL4Z6FtLo5nc+pmAMBbcQ5S6OSuql9Q1fWqOgLvz7RnVbXlN2RoXnA7gBMphhiMY7WIfMD/HsC/BPDj0GZPAPg3zcqE6+H9OfeaSzGKyFp/blBEroX3GnszrRgBQFXPAjgjIr/cXLQVwF+FNst0LE3jdGE8Az6FzlMdmY/TGnhFAAAA6UlEQVRnQMc4HRnPlwFcLyL9zVi24tK88wSAzzS/vxle7op15d6XOMwcEpF9AGZV9QkAvy0i2wEswfvNeGtGYf09AH/efN31AfhjVf0fIvLvAEBVHwLwHXhVCScBnANwm4Mx3gzgThFZAvA3AG6J+6K05N8DmGn+if7XAG5zbCxN43RiPEWkH8C/APBvA8ucG0+DODMfT1U9JiKPw5siWgLwAwDTobz0dQB/JCIn4eWlW+Ieh59QJSIqoEJPyxARlRWTOxFRATG5ExEVEJM7EVEBMbkTERUQkzsRUQExuRMRFRCTOxFRAf1/IawWKEWnJ6IAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb015cc0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0], X[y==0,1], color=\"red\", marker=\"o\")\n",
    "plt.scatter(X[y==1,0], X[y==1,1], color=\"blue\", marker=\"+\")\n",
    "plt.scatter(X[y==2,0], X[y==2,1], color=\"green\", marker=\"x\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "关于marker参数：[http://matplotlib.org/1.4.2/api/markers_api.html](http://matplotlib.org/1.4.2/api/markers_api.html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 上图使用前2个特征去画图，  有些不能很好区分\n",
    "# 下面使用后2个特征去画图，  则能够很好地区分\n",
    "X = iris.data[:,2:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG0dJREFUeJzt3WuMXPV5x/Hfs2sTaijeSLYCMTaOUhrJRGXrXdmY3DYl\nKSaNSl/0BYi0Sl7gllx211D1kgqypIrEK1g7NLgLOCTFTdSWJEWtL02amIuiLNl1lySGVqJR3HgV\ng5PWC4aE1DtPX8yZ9czsmZ0zc87Mucz3I43wnD2XZxbp8d//+Z3/MXcXAKBY+tIuAACQPJo7ABQQ\nzR0ACojmDgAFRHMHgAKiuQNAAdHcAaCAaO4AUEA0dwAooFVpXXjdunW+efPmtC4PALk0Ozv7U3df\n32y/1Jr75s2bNTMzk9blASCXzOxElP2YlgGAAqK5A0AB0dwBoIBo7gBQQDR3ACggmjsAFBDNHUDX\n1D/5rdUnwYUdH/ecRdW0uZvZRjP7lpk9Z2bHzWwsZJ8RM1sws7ngdVdnygWQVxNHJ7T7yO6l5uvu\n2n1ktyaOTrR9/I6Hd2jHwzvaPmeRRRm5n5N0h7tvkXSNpI+Z2ZaQ/Z5y98Hg9elEqwSQa+6uM784\noz3Te5Ya9O4ju7Vneo/O/OJM09F22PHjh8c1PT+t6flpjR8Zb/mcRWet/gLM7J8k3e/uX6/aNiLp\nT9z9g1HPMzw87NyhCvSO6uZbMbZ9TPddf5/MrK3jR7eNSibtnd7b1jnzyMxm3X246X6tNHcz2yzp\nSUlvd/eXq7aPSPqKpJOS5lVu9MdDjt8laZckbdq0aejEiUh30QIoCHdX36fPTxiU7iq11ITDjpcU\n65x5E7W5R/5C1cwulvSYpPHqxh44JmmTu/+GpM9K+lrYOdx9yt2H3X14/fqm694AKJDKyLta9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+X9EcdOX/e\nopAAgOaYlgGAAqK5A0AB0dwBoIBo7gBQQDR3ACggmjsAFBDNHQAKiOYOAAX0/0BQ0q4U7WzXAAAA\nAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x11c00af98>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0], X[y==0,1], color=\"red\", marker=\"o\")\n",
    "plt.scatter(X[y==1,0], X[y==1,1], color=\"blue\", marker=\"+\")\n",
    "plt.scatter(X[y==2,0], X[y==2,1], color=\"green\", marker=\"x\")\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
